# coding: utf-8
from enum import Enum

from qfluentwidgets import FluentIconBase, Theme, getIconColor

from .settings import IMAGES_DIR


class Icon(FluentIconBase, Enum):
    MAXIMIZE_ON = 'MaximizeOn'
    MAXIMIZE_OFF = 'MaximizeOff'
    MINIMIZE = 'Minimize'
    CLOSE = 'Close'
    DOUBLE_LEFT = 'DoubleLeft'
    DOUBLE_RIGHT = 'DoubleRight'
    DOUBLE_UP = 'DoubleUp'
    DOUBLE_DOWN = 'DoubleDown'
    UP = 'Up'
    DOWN = 'Down'
    LEFT = 'Left'
    RIGHT = 'Right'
    WALLPAPER = 'Wallpaper'

    def path(self, theme=Theme.AUTO):
        return (IMAGES_DIR / f"icons/{self.value}_{getIconColor(theme)}.svg").as_posix()


class SingleIcon(FluentIconBase, Enum):
    LOGO_PNG = 'Logo.png'
    WALLPAPER = 'Wallpaper.jpg'

    def path(self, theme=Theme.AUTO) -> str:
        return (IMAGES_DIR / 'single' / self.value).as_posix()
